package com.rockcent.mall.lib.domain;

import com.rockcent.common.domain.IDEntityMall;
import com.rockcent.mall.lib.domain.enumclass.IntegrationEventType;
import com.rockcent.mall.lib.domain.enumclass.MerchantCouponStatus;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;

import javax.persistence.*;

/**
 * Created by DK on 16/12/17.
 * 积分卡券审核表
 */
@Entity
@Table(name = "integration_coupon_audit")
@DynamicInsert(value = true)
@DynamicUpdate(value = true)
public class IntegrationCouponAudit extends IDEntityMall {

    @Column(columnDefinition = "bigint comment '卡卷ID'")
    private Long couponId;

    @Column(columnDefinition = "bigint comment '商家ID'")
    private Long merchantId;

    @Column(columnDefinition = "bigint comment '平台ID'")
    private Long mallId;

    @Column(columnDefinition = "varchar(200) comment '审核意见'")
    private String remark;

    @Column(columnDefinition = "varchar(30) comment 'WAIT_AUDIT(\"等待审核\"), PASS_AUDIT(\"审核通过\"), FAIL_AUDIT(\"审核失败\")'")
    @Enumerated(EnumType.STRING)
    private IntegrationEventType status = IntegrationEventType.WAIT_AUDIT;

    public Long getCouponId() {
        return couponId;
    }

    public void setCouponId(Long couponId) {
        this.couponId = couponId;
    }

    public Long getMerchantId() {
        return merchantId;
    }

    public void setMerchantId(Long merchantId) {
        this.merchantId = merchantId;
    }

    public Long getMallId() {
        return mallId;
    }

    public void setMallId(Long mallId) {
        this.mallId = mallId;
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    public IntegrationEventType getStatus() {
        return status;
    }

    public void setStatus(IntegrationEventType status) {
        this.status = status;
    }

    @Override
    public String toString() {
        return "IntegrationCouponAudit{" +
                "id=" + id +
                ", couponId=" + couponId +
                ", merchantId=" + merchantId +
                ", dateCreated=" + dateCreated +
                ", mallId=" + mallId +
                ", lastUpdated=" + lastUpdated +
                ", remark='" + remark + '\'' +
                ", isDelete=" + isDelete +
                ", status=" + status +
                ", version=" + version +
                '}';
    }
}
